﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using AdBlockListToTPLConverter;

namespace ConsoleConverter
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                Console.WriteLine("Usage: adblock2tpl adblock_filter_list.txt tracking_protection_list.txt");
            }
            else
            {
                try
                {
                    AdBlockConverter.Convert(args[0], args[1]);
                }
                catch (FileNotFoundException e)
                {
                    Console.WriteLine("Error: file \"{0}\" not found", e.FileName);
                }
                catch (Exception)
                {
                    Console.WriteLine("Error: check if you have provided correct AdBlock Plus filter list");
                }
            }
        }
    }
}
